package com.ashin.util;

import org.apache.commons.dbcp2.BasicDataSource;

import javax.sql.DataSource;

/**
 * @Author: Ashin
 * @Date: 2021/1/21
 * @Description: com.ashin.util
 * @Version: 1.0.0
 */
public class DBUtil {

    private static DBUtil INSTANCE = new DBUtil();

    private DBUtil() {

    }

    public static DBUtil getInstance() {
        return INSTANCE;
    }

    public DataSource getDataSource() {
        BasicDataSource basicDataSource = new BasicDataSource();
        basicDataSource.setUrl("jdbc:mysql://localhost:3306/pep");
        basicDataSource.setUsername("root");
        basicDataSource.setPassword("tiger");
        return basicDataSource;
    }


}
